package org.to_zero.springboot.task.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.to_zero.springboot.task.service.AsyncService;
import org.to_zero.springboot.task.service.MailService;

import javax.annotation.Resource;

@RestController
public class HelloController {

    @Resource
    private AsyncService asyncService;
    @Resource
    private MailService mailService;


    @RequestMapping("hello")
    public void hello() {
        asyncService.handling();
    }

    @RequestMapping("send")
    public void send() {
        mailService.sendMail();
    }
}
